constrain position on hints_changed in addition to the other cases.
authorHavoc Pennington <hp@pobox.com>
Sat, 18 Aug 2001 17:03:27 +0000 (17:03 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Sat, 18 Aug 2001 17:03:27 +0000 (17:03 +0000)
2001-08-18  Havoc Pennington  <hp@pobox.com>

* gtk/gtkwindow.c (gtk_window_move_resize): constrain position on
hints_changed in addition to the other cases.
(gtk_window_move_resize): include last position from configure
notify in debug spew

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/reference/gtk/tmpl/gtkrc.sgml
gtk/gtkwindow.c

index 7b3eda5f2648fe4bcdff0a339ad17453805a6640..58dd61394f90253acc25f98e97df2db0462e93a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-18  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): constrain position on
+       hints_changed in addition to the other cases.
+       (gtk_window_move_resize): include last position from configure
+       notify in debug spew
+
 2001-08-18  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
index 7b3eda5f2648fe4bcdff0a339ad17453805a6640..58dd61394f90253acc25f98e97df2db0462e93a0 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-18  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): constrain position on
+       hints_changed in addition to the other cases.
+       (gtk_window_move_resize): include last position from configure
+       notify in debug spew
+
 2001-08-18  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
index 7b3eda5f2648fe4bcdff0a339ad17453805a6640..58dd61394f90253acc25f98e97df2db0462e93a0 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-18  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): constrain position on
+       hints_changed in addition to the other cases.
+       (gtk_window_move_resize): include last position from configure
+       notify in debug spew
+
 2001-08-18  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
index 7b3eda5f2648fe4bcdff0a339ad17453805a6640..58dd61394f90253acc25f98e97df2db0462e93a0 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-18  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): constrain position on
+       hints_changed in addition to the other cases.
+       (gtk_window_move_resize): include last position from configure
+       notify in debug spew
+
 2001-08-18  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
index 7b3eda5f2648fe4bcdff0a339ad17453805a6640..58dd61394f90253acc25f98e97df2db0462e93a0 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-18  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): constrain position on
+       hints_changed in addition to the other cases.
+       (gtk_window_move_resize): include last position from configure
+       notify in debug spew
+
 2001-08-18  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
index 7b3eda5f2648fe4bcdff0a339ad17453805a6640..58dd61394f90253acc25f98e97df2db0462e93a0 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-18  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): constrain position on
+       hints_changed in addition to the other cases.
+       (gtk_window_move_resize): include last position from configure
+       notify in debug spew
+
 2001-08-18  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
index 7b3eda5f2648fe4bcdff0a339ad17453805a6640..58dd61394f90253acc25f98e97df2db0462e93a0 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-18  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): constrain position on
+       hints_changed in addition to the other cases.
+       (gtk_window_move_resize): include last position from configure
+       notify in debug spew
+
 2001-08-18  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
index cc0b23b6d217a6b8beefca09d47e350a7eb6068a..30ffca8235aa804f9d0033f0f1ed9b6a61d8fd94 100644 (file)
@@ -495,7 +495,6 @@ This can later be composited together with other
 #GtkRcStyle structures to form a #GtkStyle.
 </para>
 
-@parent_instance: 
 @name: 
 @bg_pixmap_name: 
 @font_desc: 
index a708a0e1bef367b1fed225a3b8171ebeeb347194..7b4f92ad7ec5d57fa34a3844dbe440b6bed2b39a 100644 (file)
@@ -3514,8 +3514,15 @@ gtk_window_move_resize (GtkWindow *window)
    * app author is thinking.
    */
 
+  /* This condition should be kept in sync with the condition later on
+   * that determines whether we send a configure request.  i.e. we
+   * should do this position constraining anytime we were going to
+   * send a configure request anyhow, plus when constraints have
+   * changed.
+   */
   if (configure_request_pos_changed ||
       configure_request_size_changed ||
+      hints_changed ||
       info->position_constraints_changed)
     {
       /* We request the constrained position if:
@@ -3548,36 +3555,42 @@ gtk_window_move_resize (GtkWindow *window)
     }
 
 #if 0
-  g_print ("--- %s ---\n"
-           "last : %d,%d\t%d x %d\n"
-           "this : %d,%d\t%d x %d\n"
-           "alloc: %d,%d\t%d x %d\n"
-           "req  :      \t%d x %d\n"
-           "size_changed: %d pos_changed: %d hints_changed: %d\n"
-           "configure_notify_received: %d\n"
-           "configure_request_count: %d\n"
-           "position_constraints_changed: %d\n",
-           window->title ? window->title : "(no title)",
-           info->last.configure_request.x,
-           info->last.configure_request.y,
-           info->last.configure_request.width,
-           info->last.configure_request.height,
-           new_request.x,
-           new_request.y,
-           new_request.width,
-           new_request.height,
-           widget->allocation.x,
-           widget->allocation.y,
-           widget->allocation.width,
-           widget->allocation.height,
-           widget->requisition.width,
-           widget->requisition.height,
-           configure_request_pos_changed,
-           configure_request_size_changed,
-           hints_changed,
-           window->configure_notify_received,
-           window->configure_request_count,
-           info->position_constraints_changed);
+  {
+    int notify_x, notify_y;
+
+    /* this is the position from the last configure notify */
+    gdk_window_get_position (widget->window, &notify_x, &notify_y);
+    
+    g_print ("--- %s ---\n"
+             "last : %d,%d\t%d x %d\n"
+             "this : %d,%d\t%d x %d\n"
+             "alloc: %d,%d\t%d x %d\n"
+             "req  :      \t%d x %d\n"
+             "size_changed: %d pos_changed: %d hints_changed: %d\n"
+             "configure_notify_received: %d\n"
+             "configure_request_count: %d\n"
+             "position_constraints_changed: %d\n",
+             window->title ? window->title : "(no title)",
+             info->last.configure_request.x,
+             info->last.configure_request.y,
+             info->last.configure_request.width,
+             info->last.configure_request.height,
+             new_request.x,
+             new_request.y,
+             new_request.width,
+             new_request.height,
+             notify_x, notify_y,
+             widget->allocation.width,
+             widget->allocation.height,
+             widget->requisition.width,
+             widget->requisition.height,
+             configure_request_pos_changed,
+             configure_request_size_changed,
+             hints_changed,
+             window->configure_notify_received,
+             window->configure_request_count,
+             info->position_constraints_changed);
+  }
 #endif
   
   saved_last_info = info->last;